3.3.80 \(\int \frac {\text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [280]

Optimal. Leaf size=47 \[ \frac {i \text {sech}(c+d x)}{3 d (a+i a \sinh (c+d x))}+\frac {2 \tanh (c+d x)}{3 a d} \]

[Out]

1/3*I*sech(d*x+c)/d/(a+I*a*sinh(d*x+c))+2/3*tanh(d*x+c)/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2751, 3852, 8} \begin {gather*} \frac {2 \tanh (c+d x)}{3 a d}+\frac {i \text {sech}(c+d x)}{3 d (a+i a \sinh (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]^2/(a + I*a*Sinh[c + d*x]),x]

[Out]

((I/3)*Sech[c + d*x])/(d*(a + I*a*Sinh[c + d*x])) + (2*Tanh[c + d*x])/(3*a*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2751

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b*(g*C
os[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*Simplify[2*m + p + 1])), x] + Dist[Simplify[m + p + 1]/(a*
Simplify[2*m + p + 1]), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g, m
, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[Simplify[m + p + 1], 0] && NeQ[2*m + p + 1, 0] &&  !IGtQ[m, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {\text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=\frac {i \text {sech}(c+d x)}{3 d (a+i a \sinh (c+d x))}+\frac {2 \int \text {sech}^2(c+d x) \, dx}{3 a}\\ &=\frac {i \text {sech}(c+d x)}{3 d (a+i a \sinh (c+d x))}+\frac {(2 i) \text {Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{3 a d}\\ &=\frac {i \text {sech}(c+d x)}{3 d (a+i a \sinh (c+d x))}+\frac {2 \tanh (c+d x)}{3 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 47, normalized size = 1.00 \begin {gather*} \frac {\text {sech}(c+d x) (\cosh (2 (c+d x))-2 i \sinh (c+d x))}{3 a d (-i+\sinh (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]^2/(a + I*a*Sinh[c + d*x]),x]

[Out]

(Sech[c + d*x]*(Cosh[2*(c + d*x)] - (2*I)*Sinh[c + d*x]))/(3*a*d*(-I + Sinh[c + d*x]))

________________________________________________________________________________________

Maple [A]
time = 1.34, size = 75, normalized size = 1.60

method result size
risch \(\frac {4 i \left (2 \,{\mathrm e}^{d x +c}-i\right )}{3 \left ({\mathrm e}^{d x +c}-i\right )^{3} \left ({\mathrm e}^{d x +c}+i\right ) a d}\) \(43\)
derivativedivides \(\frac {\frac {2}{4 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+4 i}-\frac {2}{3 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {3}{2 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a d}\) \(75\)
default \(\frac {\frac {2}{4 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+4 i}-\frac {2}{3 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {3}{2 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a d}\) \(75\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/d/a*(1/4/(tanh(1/2*d*x+1/2*c)+I)-1/3/(-I+tanh(1/2*d*x+1/2*c))^3+1/2*I/(-I+tanh(1/2*d*x+1/2*c))^2+3/4/(-I+tan
h(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (39) = 78\).
time = 0.27, size = 104, normalized size = 2.21 \begin {gather*} \frac {8 \, e^{\left (-d x - c\right )}}{3 \, {\left (2 \, a e^{\left (-d x - c\right )} + 2 \, a e^{\left (-3 \, d x - 3 \, c\right )} - i \, a e^{\left (-4 \, d x - 4 \, c\right )} + i \, a\right )} d} + \frac {4 i}{3 \, {\left (2 \, a e^{\left (-d x - c\right )} + 2 \, a e^{\left (-3 \, d x - 3 \, c\right )} - i \, a e^{\left (-4 \, d x - 4 \, c\right )} + i \, a\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

8/3*e^(-d*x - c)/((2*a*e^(-d*x - c) + 2*a*e^(-3*d*x - 3*c) - I*a*e^(-4*d*x - 4*c) + I*a)*d) + 4/3*I/((2*a*e^(-
d*x - c) + 2*a*e^(-3*d*x - 3*c) - I*a*e^(-4*d*x - 4*c) + I*a)*d)

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 54, normalized size = 1.15 \begin {gather*} -\frac {4 \, {\left (-2 i \, e^{\left (d x + c\right )} - 1\right )}}{3 \, {\left (a d e^{\left (4 \, d x + 4 \, c\right )} - 2 i \, a d e^{\left (3 \, d x + 3 \, c\right )} - 2 i \, a d e^{\left (d x + c\right )} - a d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

-4/3*(-2*I*e^(d*x + c) - 1)/(a*d*e^(4*d*x + 4*c) - 2*I*a*d*e^(3*d*x + 3*c) - 2*I*a*d*e^(d*x + c) - a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {\operatorname {sech}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)

[Out]

-I*Integral(sech(c + d*x)**2/(sinh(c + d*x) - I), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 59, normalized size = 1.26 \begin {gather*} \frac {\frac {3}{a {\left (i \, e^{\left (d x + c\right )} - 1\right )}} - \frac {-3 i \, e^{\left (2 \, d x + 2 \, c\right )} - 12 \, e^{\left (d x + c\right )} + 5 i}{a {\left (e^{\left (d x + c\right )} - i\right )}^{3}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

1/6*(3/(a*(I*e^(d*x + c) - 1)) - (-3*I*e^(2*d*x + 2*c) - 12*e^(d*x + c) + 5*I)/(a*(e^(d*x + c) - I)^3))/d

________________________________________________________________________________________

Mupad [B]
time = 0.48, size = 43, normalized size = 0.91 \begin {gather*} \frac {4\,\left (1+{\mathrm {e}}^{c+d\,x}\,2{}\mathrm {i}\right )\,{\left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )}^2}{3\,a\,d\,{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(c + d*x)^2*(a + a*sinh(c + d*x)*1i)),x)

[Out]

(4*(exp(c + d*x)*2i + 1)*(exp(c + d*x) + 1i)^2)/(3*a*d*(exp(2*c + 2*d*x) + 1)^3)

________________________________________________________________________________________